package userdisplays;

import java.io.Serializable;

import users.User;

import networkedmodules.Module;
import networkedmodules.Update;

public class UserPanelUpdate extends Update implements Serializable
{
	private static final long serialVersionUID = 1L;
	User user;
	UserPanel panel;
	
	public UserPanelUpdate(User user, UserPanel panel)
	{
		setKey(panel.display.getKey());
		this.user = user;
		this.panel = panel;
	}
	
	public void performUpdate(Module module)
	{
		UserPanelGroup group = (UserPanelGroup)module;
		group.putPanel(user, panel);
	}
	
	public String toString()
	{
		return user + ": " + panel;
	}
}